package Twice.day11;

import java.util.HashSet;
import java.util.Set;

/**
 * @Author: lya
 * @Description: 本类的作用描述:
 * @CreateDate: 2019/8/6
 * @Version: 1.0
 */
public class ArraySetDemo {
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,2,2,1};

        Set<Integer> set = new HashSet<>();
        for (int i = 0; i < arr.length; i++) {
            set.add(arr[i]);
        }
        System.out.println(set);
    }
}
